def factorial(n):   #计算正整数n的阶乘
    num = None
    for i in range(1,n+1):
        if num is None:
            num = i
        num *= i
    return num

if __name__ == '__main__':
    print(factorial(5))
    print(factorial(3))

